//
//  SystemMessageViewController.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/19.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "SystemMessageViewController.h"
#import "SystemMessageViewModel.h"
#import "MessageMyOrderViewController.h"

@interface SystemMessageViewController ()<SystemMessageDelegate>
@property (nonatomic,strong) SystemMessageViewModel * systemViewModel;
@end

@implementation SystemMessageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.systemViewModel = [[SystemMessageViewModel alloc] initWithViewToViewModel:self.tableView theSuperView:self.view];
    self.systemViewModel.delegate =self;
    // Do any additional setup after loading the view.
}

#pragma mark --- SystemMessageDelegate
-(void)didSelectRowAtIndexPath:(NSIndexPath *)index_p{
    MessageMyOrderViewController * myOrderVC = [MessageMyOrderViewController new];
    switch (index_p.row) {
        case 0:{
            myOrderVC.messagePType = SystemMessagePType_MyOrder;
        }
            break;
        case 1:{
            myOrderVC.messagePType = SystemMessagePType_Goods;
        }
            break;
        case 2:{
            myOrderVC.messagePType = SystemMessagePType_Nitf;
        }
            break;
            
        default:
            break;
    }
    [self.navigationController pushViewController:myOrderVC animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
